package com.numberone.master.modules.sys.dao;

import org.apache.ibatis.annotations.Param;

import com.numberone.master.common.persistence.CrudDao;
import com.numberone.master.common.persistence.annotation.MyBatisDao;
import com.numberone.master.modules.sys.entity.OfficeCard;

/**
 * 代理商卡关系DAO接口
 * @author ck
 * @version 2018-03-07
 */
@MyBatisDao
public interface OfficeCardDao extends CrudDao<OfficeCard> {
	
	int isExistence(@Param("ids")String ids,@Param("officeId")String officeId);
	
	int isExistenceUser(@Param("ids")String ids);
	
	void updateOfficeCardByCardId(@Param("cardId")String cardId,@Param("toaId")String toaId,@Param("officeId")String officeId);
	
	OfficeCard selectOfficeCardByIdAnCardId(@Param("cardId")String cardId,@Param("officeId")String officeId);
	
	OfficeCard selectShare(@Param("cardId")String cardId,@Param("officeId")String officeId,@Param("pkgType")String pkgType);
	
	OfficeCard selectUpperLevel(@Param("cardId")String cardId,@Param("toaId")String toaId);
	
	OfficeCard selectThePeople(@Param("cardId")String cardId);
	
	void deleteInfo(@Param("cardId")String cardId,@Param("officeId")String officeId); 
	
	void updateOfficeInfo(@Param("cardId")String cardId,@Param("toaId")String toaId,@Param("officeId")String officeId);

}